home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 1 / ETO Development Tools 1.iso / Essentials / MacApp Documentation / MacApp AppleLink Messages / MacApp.Tech$ 5⁄11⁄90 / 1252-AddResource Problem-May90 next >
Encoding:
Text File  |  1990-05-11  |  1.8 KB  |  34 lines  |  [TEXT/GEOL]

  1. Item    6284431                         5-May-90        06:18PDT
  2.  
  3. From:   N0917                           E I DuPont, Simon Edkins,ASC,NAT
  4.  
  5. To:     MACAPP.TECH$                    MacApp Technical
  6.  
  7. Sub:    AddResource Problem
  8.  
  9.     I have encountered a very frustrating problem with my current (and first)
  10. MacApp project.  I am dealing with data files produced by another program,
  11. files that consist of both a data fork and a resource fork. The resource fork
  12. can contain between 2 and 4 resources, depending on what kind of pre-processing
  13. the file has received from yet another program.  I want my program to read in
  14. the data fork, display it, and after some user processing, add another resource
  15. to the file.  I do nothing to the data directly.
  16.     The problem comes when adding the new resource.  I put AddResource in my
  17. DoWrite method, following the lead of the DemoText example program.  I
  18. subsequently found that the resource had been added all right, but that in
  19. doing so, the rest of the resource fork was gone, as well as the data fork! My
  20. 70K file was now about 1K.
  21.     What is MacApp doing behind my back to the resource map?  What could
  22. possibly cause the file system to overwrite the data fork with a ResManager
  23. call?  By the way, I have tried calling UseResFile with the fRsrcRefNum field
  24. and that only rewards me with "can't save due to a disk error" message.  I
  25. would hate to think that I have to read in all the existing resources only to
  26. write them out again, along with the data fork. I know this isn't necessary
  27. with procedural programming.
  28.     Help! Does anyone have any idea what is going on here?  Up to now, I have
  29. been quite enamored of MacApp, but this problem has brought my progress to a
  30. screeching halt, on a project that my employer is awaiting with decreasing
  31. patience.
  32.     Please respond to my Link address, N0917.  Thanks.
  33.  
  34.